/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.monVehicule.utilisateur;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import fr.monVehicule.utils.SessionUtil;
import java.util.Map;
import org.apache.struts2.interceptor.SessionAware;

/**
 *
 * @author David
 */
public class ChoixVehiculeAction extends ActionSupport implements SessionAware{

    Map<String, Object> m;
    
    @Override
    public String execute() throws Exception {
        Map<String, Object> params = ActionContext.getContext().getParameters();
        String[] vehiculeId = (String[]) params.get("idVehicule");
        m.put(SessionUtil.VEHICULE_SELECTED, Integer.parseInt(vehiculeId[0]));
        return SUCCESS;
    }
    
    @Override
    public void setSession(Map<String, Object> map) {
        m = map;
    }
    
}
